From: Giovanni Campagna Date: Mon, 26 Nov 2012 16:52:42 +0000 (+0100) Subject: MessageTray: wait until the tray is hidden to switch styles X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5062 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=df2cab877fb41ec139e51394b2ca3acad4e092dd;p=gnome-shell.git MessageTray: wait until the tray is hidden to switch styles Switching style on Overview::hiding creates a weird effect, as the noise texture is shown while the overview is still visibile. Instead, wait for the tray to be fully hidden, then apply the new style. As now the switch is invisible, there is no need for the transition (which introduced the same problem on overview showing) https://bugzilla.gnome.org/show_bug.cgi?id=689091 --- diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 5b957e4bc..34e1afed3 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -1313,7 +1313,6 @@ StScrollBar StButton#vhandle:active { #message-tray { background: #2e3436 url(message-tray-background.png); background-repeat: repeat; - transition-duration: 250ms; height: 72px; } diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 9e408ff68..bc9bb78f0 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1515,7 +1515,6 @@ const MessageTray = new Lang.Class({ function() { this._overviewVisible = false; this._escapeTray(); - this.actor.remove_style_pseudo_class('overview'); this._updateState(); })); @@ -2190,7 +2189,9 @@ const MessageTray = new Lang.Class({ this._tween(this.actor, '_trayState', State.HIDDEN, { y: 0, time: ANIMATION_TIME, - transition: 'easeOutQuad' + transition: 'easeOutQuad', + onComplete: this._onTrayHidden, + onCompleteScope: this }); // Note that we might have entered here without a grab, @@ -2200,6 +2201,11 @@ const MessageTray = new Lang.Class({ this._lightbox.hide(); }, + _onTrayHidden: function() { + if (!this._overviewVisible) + this.actor.remove_style_pseudo_class('overview'); + }, + _hideDesktopClone: function(now) { this._tween(this._desktopClone, '_desktopCloneState', State.HIDDEN, { y: 0,